home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 1 / your choice.zip / your choice / PRGMMING / RASTERS / RASTERS.NFO < prev    next >
Text File  |  1994-01-07  |  2KB  |  57 lines

  1. Hello there! 
  2.  
  3. Here's the main loop to these nice rasters... It was written in Turbo Pascal,
  4. because it is fast enough to be able to do this trick. Actually it is very 
  5. simple! This is how it works...
  6.  
  7.  
  8. [--- Initialise the whole shit ---]
  9.  
  10. - Set up the colors for the bars in a big array which hold all different 
  11.   colors
  12. - Set the speed
  13. - Set startposition of bar-array (0)
  14.  
  15. [--- Main loop ---]
  16.  
  17. Repeat
  18.       Repeat
  19.  
  20.       - Start drawing the bars (with colors from the array) by just poking 
  21.         the rgb values in the vga-palette register very fast... This way
  22.         it looks like if there are different colors on screen (there are,
  23.         but then again there aren't)
  24.       - When last color in array is reached, start over again
  25.  
  26.       Until last scanline is reached
  27.  
  28.       - Add speed to startposition of bar-array so it starts scrolling
  29. Until a key is pressed 
  30.  
  31. - Reset the colors
  32.  
  33. [--- End ---]
  34.  
  35. That's it! Simple eh? You can make nice things like bouncing bars or swinging
  36. bars... 
  37.  
  38. It isn't such a complicated code... Mostly it consist of Turbo Pascal with
  39. just a small piece (about 5 a 6 lines) of assembly to check the vertical
  40. retrace.
  41.  
  42. Usage is simple:
  43.  
  44. Rasters 1 (for a speed of 1)
  45. Rasters -1 (for speed of -1 (down))
  46.  
  47. Rasters /h for help!
  48.  
  49. See ya!  - Eric vd Staay
  50.  
  51. Oh yeah! - Sourcecode available on request! (just write me, the adress is in
  52. the program itself!) Also write me if you want a crackintro or some bbs-
  53. advertisements!!! Everything's possible!
  54.  
  55.  
  56.  
  57.